import React from 'react'
import { Card, Icon, Image,Label,Statistic,Button } from 'semantic-ui-react'

const CardExampleCard = (props) => (
    <Card>
        <Image src='/image/1.png' />
        <Card.Content>
            <Card.Header>中国福利彩票</Card.Header>
            <Card.Meta>
                <p>官方地址</p>
                <Label size='mini'>
                    <Icon name='hand point right'/> {props.manager}
                </Label>
                <p>当前地址</p>
                <Label size='mini'>
                    <Icon name='hand point right'/> {props.currentAccount}
                </Label>
            </Card.Meta>
            <Card.Description>每晚八点准时开奖，不见不散!</Card.Description>
        </Card.Content>
        <Card.Content extra>
                <Icon name='user'/>
                本期共{props.playerCount}人参与
            <p>上一期中奖者：{props.winner}</p>
        </Card.Content>

        <Card.Content extra>
            <Statistic color='red'>
                <Statistic.Value>{props.amount}ETH</Statistic.Value>
                <Statistic.Label>奖金池</Statistic.Label>
            </Statistic>
        </Card.Content>

        <Card.Content extra>
            <Statistic color='blue'>
                <Statistic.Value>第{props.round}期</Statistic.Value>
                <Statistic.Label><a href='#'> 点击我查看交易历史</a></Statistic.Label>
            </Statistic>
        </Card.Content>
        <Button animated='fade' color='green' onClick={props.play} onLoad={props.isPlaying}  disabled={props.isDisable()}>
            <Button.Content visible>投注产生希望</Button.Content>
            <Button.Content hidden>购买放飞梦想</Button.Content>
        </Button>
        <Button inverted color='red' style={{display:props.buttonControl}}   onClick={props.draw} onLoad={props.isDrawing} disabled={props.isDisable()} >
            开奖
        </Button>
        <Button inverted color='brown' style={{display:props.buttonControl}} onClick={props.drawback} onLoad={props.isDrawingBack} disabled={props.isDisable()}>
            退奖
        </Button>
    </Card>
);

export default CardExampleCard